#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: title008.py 
@version:
@time: 2023/05/13
实现删除字符串中出现次数最少的字符，
若出现次数最少的字符有多个，
则把出现次数最少的字符都删除。
输出删除这些单词后的字符串，
字符串中其它字符保持原来的顺序。
"""


def solution():
    s = input()
    dic = {}

    for i in s:
        if i in dic:
            dic[i] += 1
        else:
            dic[i] = 1

    MIN = min(dic.values())
    for i in s:
        if dic[i] == MIN:
            s = s.replace(i, '')
    print(s)


while True:
    try:
        solution()
    except:
        break
